/// @Classname : HcTitlePage
/// @Author :
/// @Time : 2023-09-04 9:24
/// @Description : //todo

import 'package:flutter/material.dart';
import 'package:hc_ui/config/hc_customer_config.dart';
import 'package:hc_ui/theme/hc_common_theme.dart';
import 'package:hc_ui/theme/hc_title_theme.dart';
import 'package:hc_ui/widget/title/hc_full_title.dart';
import 'package:hc_ui/widget/title/hc_title.dart';

class HcTitlePage extends StatelessWidget {
  const HcTitlePage({super.key});

  @override
  Widget build(BuildContext context) {
    HcCommonTheme commonTheme = HcCustomerConfig().allTheme.commonTheme;
    return Scaffold(
      backgroundColor: commonTheme.fillPageColor,
      appBar: AppBar(
        title: Text("标题"),
      ),
      body: ListView(
        padding: EdgeInsets.symmetric(
            vertical: commonTheme.hSpacingPage,
            horizontal: commonTheme.hSpacingPage),
        children: [
          const HcFullTitle(
            title: "只有标题的标题(默认无点)",
          ),
          const HcFullTitle(
            title: "标题",
            subtitle: "这里是副标题",
          ),
          const HcFullTitle(
            showDot: true,
            title: "带点组件的标题",
            subtitle: "这里是副标题",
          ),
          const HcFullTitle(
            showDot: true,
            showLine: false,
            title: "隐藏线的标题",
            subtitle: "这里是副标题",
          ),
          const HcFullTitle(
            showDot: true,
            showLine: false,
            title: "猜你喜欢",
            subtitle: "guess you like it",
            subTitleCapitalize: true,
          ),
          const HcFullTitle(
            showDot: true,
            title: "猜你喜欢",
            subtitle: "guess you like it",
            subTitleCapitalize: true,
            color: Colors.pink,
          ),
          HcFullTitle(
            showDot: true,
            // showLine: false,
            title: "猜你喜欢",
            subtitle: "guess you like it",
            dotWidget: const Text("点"),
            lineWidget: Container(
              color: Colors.blue,
              width: double.infinity,
              height: 2,
            ),
            subTitleCapitalize: true,
          ),
          const HcTitle(
            title: "这是标题",
          ),
          const HcTitle(
            title: "这是标题",
            subtitle: "这叫副标题",
          ),
          const HcTitle(
            title: "那就加个icon",
            subtitle: "这叫副标题",
            leading: Icon(Icons.add),
          ),
          HcTitle(
            title: "错误的示范文字过长过长出过场床",
            subtitle:
                "错误的示范文字过长过长出过场床错误的示范文字过长过长出过场床错误的示范文字过长过长出过场床错误的示范文字过长过长出过场床",
            leading: Icon(Icons.abc_outlined),
            trailing: Icon(Icons.arrow_forward_ios_outlined),
          ),
          HcTitle(
            title: "标题太少了",
            subtitle: "english subtitle",
            subTitleCapitalize: true,
            leading: Icon(Icons.abc_outlined),
            trailing: Icon(Icons.arrow_forward_ios_outlined),
          ),
          HcTitle.dot(
            title: "标题文字比较少",
            themeData: HcTitleTheme(titleStyle: TextStyle(fontSize: 10)),
          ),
          HcTitle(
            isShowUnderLine: true,
            title: "带下划线的怎么样",
            subtitle: "这是副标题",
          ),
          HcTitle(
            isShowTopDot: true,
            isShowUnderLine: true,
            title: "那就再来一个带点的吧",
            subtitle: "一个文字",
          ),
          HcTitle(
            isShowTopDot: true,
            title: "玩点花的?",
            isStackSubtitle: true,
            subTitleCapitalize: true,
            subtitle: "englist subtitle",
          ),
          HcTitle(
            isShowTopDot: true,
            themeData: HcTitleTheme(alignment: MainAxisAlignment.center),
            title: "我居中了",
            isStackSubtitle: true,
            subTitleCapitalize: true,
            subtitle: "english subtitle",
          ),
          HcTitle(
            isShowUnderLine: true,
            themeData: HcTitleTheme(alignment: MainAxisAlignment.end),
            title: "我在右边了",
            // isStackSubtitle: true,
            // subTitleCapitalize: false,
            subtitle: "englist subtitle",
          ),
          HcTitle(
            isShowUnderLine: true,
            title: "其实我也行,顺便换个颜色",
            isStackSubtitle: true,
            subTitleCapitalize: true,
            subtitle: "englist subtitle",
          ),
          HcTitle.dot(
            title: "好大的标题",
            themeData: HcTitleTheme(titleStyle: TextStyle(fontSize: 30)),
          ),
          HcTitle(
            subtitle: "什么居然没有标题 ",
          )
        ],
      ),
    );
  }
}
